﻿using System.Linq;
using CI.Models.Data;
using CI.Models.Production;
using CI.Models.Production.Interfaces;
using CI.ViewModels.Diagramming;

namespace CI.ViewModels.Industry
{
    public sealed class Tech3ItemSelectorViewModel : InventoryItemSelectorViewModelBase
    {
        public Tech3ItemSelectorViewModel(IStaticDataRepository<Item> itemDataRepository, string groupName,
                                          DiagramViewModel parentViewModel)
            : base(groupName, parentViewModel)
        {
            PreFiltered =
                itemDataRepository.All.Where(i => i.Blueprint != null && i.Blueprint.TechLevel == 3).AsQueryable();

            ApplyFilter();
        }
    }
}